/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistencia;

import java.sql.SQLException;

/**
 *
 * @author Evision
 */
public abstract class PersistentObject {
    
    private PersistenceBroker brk;
    
    public PersistentObject(){
        brk=PersistenceBroker.getInstacia();
    }
    
    public void save() throws SQLException, Exception{
        brk.saveObject(this);
    }
    
    public void retrieve() throws Exception{
        brk.retrieveObject(this);
    }
    
    public void delete() throws Exception{
        brk.deleteObject(this);
    }
    
    public void update() throws Exception{
        brk.updateObject(this);
    }
    
    public void select() throws Exception {
        brk.selectObject(this);
    }
    
}
